﻿/* 点卷商店 */

var z = "#fEffect/CharacterEff/1112925/0/0#";  //蓝星

var status = 0;

function start() {
    status = -1;
    action(1, 0, 0);
}

function action(mode, type, selection) {
    if (status == 0 && mode == 0) {
        cm.dispose();
        return;
    }
    if (mode == 1) {
        status++;
    } else {
        status--;
    }
    if (status == 0) {
    var selStr = "#亲爱的#r#h ##k您好，这里是点卷商城，请您选择您需要的功能:\r\n";
		selStr += "#d您当前点券： #r"+cm.getNX(1)+"#k #d点#k\t#d当前抵用券： #r" + cm.getNX(2) + "#k #d点#k\r\n#e#d-：(#r-#k):\r\n#n#k";
		selStr += "				#L0#" + z +"#r游戏宝库#l\r\n\r\n";
		selStr += "#L1#" + z +"#b购买装备#l	#L2#" + z +"购买饰品#l \t   #L3#" + z +"购买图腾#l\r\n";
		selStr += "#L4#" + z +"#b强化礼包#l	#L5#" + z +"潜能卷轴#l \t   #L6#" + z +"伤害皮肤#l\r\n";
		selStr += "#L7#" + z +"#b口袋物品#l	#L8#" + z +"炫酷骑宠#l \t   #L10#" + z +"涅槃火花#l\r\n\r\n";




        cm.sendSimple(selStr);
    } else if (status == 1) {

        switch (selection) {
        case 0:
            cm.dispose();
            cm.openNpc(9310382, "游戏宝库"); //游戏宝库
            break;
        case 1:
            cm.sendSimple("该功能关闭中.");
            cm.dispose();
            // cm.openNpc(9310382, 29); //购买装备
            break;
        case 2:
            cm.dispose();
            cm.openNpc(9310382, 28); //购买饰品
            break;
        case 3:
            cm.sendSimple("该功能关闭中.");
            cm.dispose();
            // cm.openNpc(9310382, 30); //购买图腾
            break;
        case 4:
            cm.dispose();
            cm.openNpc(9310382, 31); //强化礼包
            break;
        case 5:
            cm.dispose();
            cm.openNpc(9310382, 154); //特殊卷轴
            break;
        case 6:
            cm.dispose();
            cm.openNpc(9310382, 49); //伤害皮肤
            break;
        case 7:
            cm.dispose();
            cm.openNpc(9310382, 126); //口袋物品
            break;
        case 8:
            cm.sendSimple("该功能关闭中.");
            cm.dispose();
            // cm.openNpc(9310382, 502); //炫酷骑宠
            break;
        case 9:
            cm.dispose();
            cm.openNpc(9310382, 127); //喇叭
            break;
        case 10:
            cm.dispose();
            cm.openNpc(9900004, 105); //火花
            break;

        }
    }
}
